//
//  CXImagesDetailViewController.m
//  Delicious
//
//  Created by dllo on 15/11/27.
//  Copyright © 2015年 doll. All rights reserved.
//

#import "CXImagesDetailViewController.h"
#import "CXRecommendCollectionModel.h"
#import "CXNetHandle.h"

@interface CXImagesDetailViewController ()


@property (nonatomic, retain) UIImageView *img_photo;
@property (nonatomic, retain) UILabel *label_name;
@property (nonatomic, retain) UILabel *label_brief;


@end

@implementation CXImagesDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor redColor];
    
    [self prepareData];
    [self createViews];
    
}

- (void)createViews
{
    self.img_photo = [[UIImageView alloc] init];
    [self.view addSubview:self.img_photo];
    
    self.label_name = [[UILabel alloc] init];
    [self.view addSubview:self.label_name];
    
    self.label_brief = [[UILabel alloc] init];
    [self.view addSubview:self.label_brief];
    
    
}

- (void)prepareData
{
    NSLog(@"%@", self.model_inages.click_obj);
    NSString *str_url = @"http://api.meishi.cc/v5/recipe.php";
    NSDictionary *dic_body = @{@"lon":@"121.545169", @"source":@"android", @"time":@"1448623493", @"from_home_like":@"0", @"id":self.model_inages.click_obj, @"":@"a52e7fe86c07ab2e519f33e9c4fd93b2", @"lat":@"38.883596", @"format":@"json"};
    NSString *str_cookie = @"application/x-www-form-urlencoded; charset=UTF-8";
    [CXNetHandle postUrl:str_url parame:dic_body cookie:str_cookie result:^(id result) {
        //NSLog(@"%@", result);
        //016d4fb02b40b933f50ca4410c6dd710
        //016d4fb02b40b933f50ca4410c6dd710
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
